var app = getApp(),
  util = require("../../../utils/util.js");

Page({
  data: {
    VerifyCode: "立即验证",
    bdsjhtext: "验证微信手机号",
    isyz: !0,
    isbd: !1,
    isdx: !0,
    fsyzm: !1,
    fwxy: !0,
    radioItems: []
  },
  lookck: function() {
    this.setData({
      fwxy: !1
    });
  },
  queren: function() {
    this.setData({
      fwxy: !0
    });
  },
  radioChange: function(e) {
    console.log("radio发生change事件，携带value值为：", e.detail.value);
    for (var t = this.data.radioItems, a = 0, o = t.length; a < o; ++a) t[a].checked = t[a].id == e.detail.value,
      t[a].checked && this.setData({
        zfmoney: t[a].money,
        zfts: t[a].days
      });
    this.setData({
      radioItems: t
    });
  },
  bindDateChange: function(e) {
    this.setData({
      start: e.detail.value
    });
  },
  hqsjh: function(e) {
    console.log(e.detail.value), this.setData({
      sjh: e.detail.value
    }), "" != e.detail.value ? this.setData({
      isyz: !1
    }) : this.setData({
      isyz: !0
    });
  },
  setVerify: function() {

  },
  dw: function() {
    var t = this;
    wx.chooseLocation({
      success: function(e) {
        console.log(e), t.setData({
          weizhi: e.address,
          jwd: e.latitude + "," + e.longitude
        });
      },
      fail: function() {
        wx.showModal({
          title: "警告",
          content: "您点击了拒绝地理位置授权,无法正常使用功能，点击确定重新获取授权。",
          showCancel: !1,
          success: function(e) {
            e.confirm && wx.openSetting({
              success: function(e) {
                e.authSetting["scope.userLocation"], t.dw();
              },
              fail: function(e) {}
            });
          }
        });
      }
    });
  },
  getPhoneNumber: function(e) {
    // var t = this;
    // console.log(e), console.log(e.detail.iv), console.log(e.detail.encryptedData), "getPhoneNumber:fail user deny" == e.detail.errMsg ? wx.showModal({
    //   title: "提示",
    //   showCancel: !1,
    //   content: "您未授权获取您的手机号",
    //   success: function(e) {}
    // }) : app.util.request({
    //   url: "entry/wxapp/Jiemi",
    //   cachetime: "0",
    //   data: {
    //     sessionKey: getApp().getSK,
    //     data: e.detail.encryptedData,
    //     iv: e.detail.iv
    //   },
    //   success: function(e) {
    //     console.log("解密后的数据", e), null != e.data.phoneNumber && t.setData({
    //       sjh: e.data.phoneNumber,
    //       isbd: !0,
    //       bdsjhtext: "验证成功"
    //     });
    //   }
    // });
  },
  formSubmit: function(e) {},
  onLoad: function(e) {

  },
  onReady: function() {},
  onShow: function() {},
  onHide: function() {},
  onUnload: function() {},
  onPullDownRefresh: function() {},
  onReachBottom: function() {}
});